package net.similarsu.device.sdk.hik.structure;


import com.sun.jna.Pointer;
import com.sun.jna.Structure;

import static net.similarsu.device.sdk.hik.library.HikLibrary.MAX_NAMELEN;

@Structure.FieldOrder({
        "dwSize"
        ,"dwMajor"
        ,"dwMinor"
        ,"struTime"
        ,"sNetUser"
        ,"struRemoteHostAddr"
        ,"struAcsEventInfo"
        ,"dwPicDataLen"
        ,"pPicData"
        ,"wInductiveEventType"
        ,"byPicTransType"
        ,"byRes1"
        ,"dwIOTChannelNo"
        ,"pAcsEventInfoExtend"
        ,"byAcsEventInfoExtend"
        ,"byTimeType"
        ,"byRes"
})
public class NET_DVR_ACS_ALARM_INFO extends Structure {
    public int dwSize;
    public int dwMajor; //报警主类型，参考宏定义
    public int dwMinor; //报警次类型，参考宏定义
    public NET_DVR_TIME struTime; //时间
    public byte[]    sNetUser = new byte[MAX_NAMELEN] ;//网络操作的用户名
    public NET_DVR_IPADDR    struRemoteHostAddr ;//远程主机地址
    public NET_DVR_ACS_EVENT_INFO struAcsEventInfo; //详细参数
    public int dwPicDataLen;   //图片数据大小，不为0是表示后面带数据
    public Pointer pPicData;
    public short  wInductiveEventType; //归纳事件类型，0-无效，客户端判断该值为非0值后，报警类型通过归纳事件类型区分，否则通过原有报警主次类型（dwMajor、dwMinor）区分
    public byte    byPicTransType;        //图片数据传输方式: 0-二进制；1-url
    public byte    byRes1;             //保留字节
    public int dwIOTChannelNo;    //IOT通道号
    public Pointer    pAcsEventInfoExtend;    //byAcsEventInfoExtend为1时，表示指向一个NET_DVR_ACS_EVENT_INFO_EXTEND结构体
    public byte    byAcsEventInfoExtend;    //pAcsEventInfoExtend是否有效：0-无效，1-有效
    public byte    byTimeType; //时间类型：0-设备本地时间，1-UTC时间（struTime的时间）
    public byte[] byRes = new byte[10];

    public NET_DVR_ACS_ALARM_INFO(){
        super();
    }

    public NET_DVR_ACS_ALARM_INFO(Pointer pointer){
        super(pointer);
    }

    public static class ByReference extends NET_DVR_ACS_ALARM_INFO implements Structure.ByReference {
    }

    public static class ByValue extends NET_DVR_ACS_ALARM_INFO implements Structure.ByValue {
    }
}
